<div class="card-body">
    <ul class="list-group list-group-flush">
        {{--帖子列表--}}
        @foreach($topics as $topic)
            <li class="d-flex align-items-center list-group-item d-flex justify-content-between align-items-center topic_intro">

                <a class="flex-shrink-0" href="{{route('users.show',$topic->user->id)}}">
                    <img width="50" class="img-thumbnail" src="{{$topic->user->avatar}}"
                         alt="{{$topic->user->name}}">
                </a>
                <div class="flex-grow-1 px-2">
                    <a class="text-decoration-none text-success"
                       href="{{$topic->link()}}">
                        {{$topic->title}}
                    </a>
                    <div class="">
                        <small><i class="fa-solid fa-list"></i><a class="text-decoration-none" title="{{$topic->category->name}}"
                              href="{{route('categories.show',$topic->category->id)}}">{{$topic->category->name}}</a></small>
                        <span>  ·   </span>
                        <small><i class="fa-solid fa-user"></i>
                            <a class="text-decoration-none text-secondary"
                                href="{{route('users.show',$topic->user->id)}}">{{$topic->user->name}}</a></small>
                        <span>  ·   </span>
                        <small><i class="fa-regular fa-clock"></i>
                            <a class="text-decoration-none text-secondary">{{$topic->created_at->diffForHumans()}}</a></small>

                    </div>
                </div>
                <span
                    class="pointerA badge  bg-{{$topic->reply_count?'primary':'secondary'}} rounded-pill text-bg-dark">{{$topic->reply_count}}</span>
            </li>

        @endforeach
    </ul>
</div>

<div class="card-footer text-muted">
    @if(count($topics))
        @include('utils._pages',['data'=>$topics])
    @else
        @include('utils._nodata_topic')
    @endif
</div>
